package com.lobstar.xrpc.server.handler.task;

import java.util.concurrent.ArrayBlockingQueue;
import java.util.concurrent.BlockingQueue;

import com.lobstar.xrpc.common.po.Task;

public class Tasks {

	private static BlockingQueue<Task> requestQueue = new ArrayBlockingQueue<Task>(500);

	public static boolean addTask(Task task) {
		return requestQueue.add(task);
	}
	public static Task getRequest() throws InterruptedException {
		return requestQueue.take();
	}

}
